<template>
    <div class="box">
        <headers title="购物车"></headers>

        <img src="../../../assets/tu.png" alt="">
        <img src="../../../assets/tu.png" alt="">

        <van-submit-bar :price="3050" button-text="提交订单" @submit="onSubmit" style="bottom: 5rem;" />


    </div>
</template>

<script setup>
import { ref } from "vue";
import headers from "@/components/headers.vue";

import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()

import _ from "lodash";
//  _.debounce(calculateLayout, 150)

const onSubmit = _.debounce(() => {
    router.push({
        path: '/home/detail',
        query: {
            time: '2020-12-12',
            name: "雪地靴",
            price: 120,
        }
    })
}, 150);

</script>

<style lang="scss" scoped>
.box {
    width: 100%;
    height: 100%;
}
</style>